#ifndef WIDGET_H
#define WIDGET_H
#include "MessageType.h"
#include "mytcpsocket.h"
#include "registerdialog.h"
#include <QWidget>
#include <QByteArray>
#include <QLineEdit>
QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT


public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

public slots:
    void login();
    void handelLoginPacket(const Packet& packet);
    void init();


private:
    Ui::Widget *ui;
    MyTcpSocket *clientTcpSocket = nullptr;
    RegisterDialog * m_register = nullptr;
    QPushButton *button_longin= nullptr;
    QPushButton *button_register = nullptr;
    QLineEdit *lineEdit_username = nullptr;
    QLineEdit *lineEdit_passsword = nullptr;
};
#endif // WIDGET_H
